import { Entity, PrimaryColumn, Column,  } from "typeorm";
import { ManualTimestamp } from "../decorators/manual-timestamp.decorator";

/**
 * 坐骑等级经验表
 * 存储每个等级对应的经验值、训练数据等
 */
@Entity("mount_level_experience")
@ManualTimestamp()
export class MountLevelExperienceEntity {
  /**
   * 等级 (主键)
   */
  @PrimaryColumn({ type: "int", comment: "等级" })
  level!: number;

  /**
   * 该等级需要的总经验值
   */
  @Column({ type: "bigint", comment: "该等级需要的总经验值" })
  experience!: number;

  /**
   * 升到下一级所需经验
   */
  @Column({ type: "bigint", name: "exp_to_next", comment: "升到下一级所需经验" })
  expToNext!: number;

  /**
   * 训练一次所得经验
   */
  @Column({ type: "int", name: "exp_per_training", comment: "训练一次所得经验" })
  expPerTraining!: number;

  /**
   * 升到下一级所需训练次数
   */
  @Column({ type: "int", name: "training_count", comment: "升到下一级所需训练次数" })
  trainingCount!: number;

  /**
   * 升到当前等级所需训练总次数
   */
  @Column({ type: "int", name: "total_training", comment: "升到当前等级所需训练总次数" })
  totalTraining!: number;

  /**
   * 创建时间
   */
  @Column("datetime", { comment: "创建时间" })
  created_at!: Date;

  /**
   * 更新时间
   */
  @Column("datetime", { comment: "更新时间" })
  updated_at!: Date;
}
